<extend name="Public/base"/>
<block name="head">
    <!-- DATA TABLES -->
    <!--<link href="__PUBLIC__/plugins/datatables/dataTables.bootstrap.css" rel="stylesheet" type="text/css" />-->
    <link href="__PUBLIC__/plugins/datatables/jquery.dataTables.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/plugins/datatables/extensions/TableTools/css/dataTables.tableTools.min.css" rel="stylesheet" type="text/css" />
    <style>
        .clear {
            float: right;
            padding: 3px;
            margin: 0px 10px;
        }

    </style>
</block>

<block name="body">
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="box">
                    <div class="box-body table-responsive">
                        <table id="role-tables" class="table table-bordered table-hover">
                            <thead>
                            <tr>
                                <th>编号</th>
                                <th>组名</th>
                                <th>上级组</th>
                                <th>状态</th>
                                <th>描述</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <volist name="lists" id="vo" >
                                <tr data="{$vo['id']}">
                                    <td>{$vo['id']}</td>

                                    <td>{$vo['name']}</td>

                                    <td>{$vo['pid']|getGroupName}</td>

                                    <td>{$vo['status'] | getStatus}</td>

                                    <td>{$vo['remark']}</td>
                                    <td>
                                        {$vo['status']|showStatus=$vo['id']}
                                        <a href="__URL__/addAccess/groupId/{$vo['id']}">授权</a>
                                        <a href="__URL__/user/id/{$vo['id']}"  title="{$vo['name']} 用户列表 ">用户列表</a>
                                    </td>
                                </tr>
                            </volist>
                            </tbody>

                        </table>
                    </div><!-- /.box-body -->
                </div><!-- /.box -->
            </div><!-- /.col -->
        </div><!-- /.row -->
    </section><!-- /.content -->

    <include file="add" />
</block>

<block name="script">

    <script src="__PUBLIC__/plugins/datatables/jquery.dataTables.min.js" type="text/javascript"></script>
    <script src="__PUBLIC__/plugins/datatables/dataTables.bootstrap.min.js" type="text/javascript"></script>
    <script src="__PUBLIC__/plugins/datatables/extensions/TableTools/js/dataTables.tableTools.min.js" type="text/javascript"></script>

    <script type="text/javascript">
        $(function () {
            iniDataTable("#role-tables",'ajaxGetRoleData()','__URL__');
            iniAjaxFormDialog('#roleAddForm','#add');
        });
    </script>

</block>

